function PP=Setup_PP(ParamInput)

%% Structural Parameters
%--------------------------------------------------------------------------
% Heterogeneous Household Block
%--------------------------------------------------------------------------
% Preference
% BETA        =   1-0.051/4;
NU_C        =   1;
NU_L        =   1;

% Life-cycle
XI          =   1/45/4;

% Liquid Asset Borrowing Premium
KAPPA       =   0.06/4;

% Financial Constraint
b_lb        =   -1;

% Income Tax Rate and Transfer
TAU_SS      =   0.20;
UI_Slack    =   0;
MinCon      =   1e-2;


%--------------------------------------------------------------------------
% New Keynesian Block
%--------------------------------------------------------------------------
% Steady State Levels
i_SS        =   0.04/4;
Pir_SS      =   0.02/4;
N_SS        =   0.5;
T_SS        =   0.12;
B_Y_SS      =   3.12;
B_Total_SS  =   0.91*4;
% Technology
ALPHA       =   0.00;
% Price Setting
EPSILON     =   10;
THETA       =   100;
% Monetary Policy
Taylor_ir   =   0.75;
Taylor_Pi   =   1.1;
Taylor_dE   =   0;
% Aggregation Shocks: Persistence
RHO_Z       =   0.7;
RHO_M       =   0.7;
% Aggregation Shocks: Std
SIG_Z       =   0.01/4; 
SIG_M       =   0.01/4;

%--------------------------------------------------------------------------
% Update the Parameter Values based on the Input Information
%--------------------------------------------------------------------------
if nargin>0
    ParamList   =   fieldnames(ParamInput);
    for ii=1:length(ParamList)
        if isnumeric(ParamInput.(ParamList{ii})) && length(ParamInput.(ParamList{ii}))==1
            eval([ParamList{ii},'=',num2str(ParamInput.(ParamList{ii})),';']);
        end
    end
end


%% Computation Parameters
%--------------------------------------------------------------------------
% Grid of Exogenous States 
%--------------------------------------------------------------------------
%==
% Idiosyncratic Income State
%==
% Step 1: Mixed Markov Chains
Rho_1           =   0.7494;
Sig_1           =   0.7757;
Skew_1          =   -4.0703;
Rho_2           =   0.2518;
Sig_2           =   0.3149;
Skew_2          =   2.0482;

[Grid_1,TrMat_1]=   Rouwenhorst(3,Rho_1,0,Sig_1,Skew_1);
[Grid_2,TrMat_2]=   Rouwenhorst(3,Rho_2,0,Sig_2,Skew_2);
[TempGrid,TrMat]=   MarkovChain_IndependentMixture({Grid_1,TrMat_1},{Grid_2,TrMat_2});            
State_IdioInc   =   sum(TempGrid,2);
ShrinkFactor    =   1;
State_IdioInc   =   State_IdioInc/ShrinkFactor;

% Step 2: Sort the Idio-Income Shock Grid
[State_IdioInc,TempInd] ...
                =   sort(State_IdioInc);
TrMat_IdioInc   =   TrMat(TempInd,:);
TrMat_IdioInc   =   TrMat_IdioInc(:,TempInd);
Node_IdioInc    =   exp(State_IdioInc);
TrMat_IdioInc(TrMat_IdioInc<1e-6) ...
                =   0;
TrMat_IdioInc   =   bsxfun(@rdivide,TrMat_IdioInc,sum(TrMat_IdioInc));
if nnz(TrMat_IdioInc)/numel(TrMat_IdioInc)>0.2
    TrMat_IdioInc   =   sparse(TrMat_IdioInc);
end

% Step 3: Normalization
InvDist_IdioInc =   MarkovChain_InvDist(TrMat_IdioInc,[]);
Node_IdioInc    =   Node_IdioInc/(Node_IdioInc'*InvDist_IdioInc);
Num_IdioInc     =   size(Node_IdioInc,1);


IdioInc         =   struct('N',Num_IdioInc,'State',State_IdioInc,...
                           'Node',Node_IdioInc,'IndNode',(1:1:Num_IdioInc)',...
                           'TrMat',TrMat_IdioInc,'InvDist',InvDist_IdioInc);


% Collect the Grids for Exogenous State
ExoState        =   struct('IdioInc',IdioInc);

%--------------------------------------------------------------------------
% Quadrature for Integration
%--------------------------------------------------------------------------
% Shocks to xxxxx

% Collect the Quadrature for Integration over Shocks
QW          =   struct();

%--------------------------------------------------------------------------
% Function Approximation
%--------------------------------------------------------------------------
Nb  =   30; Cb  =   0.3;
% VFun
VFunApp     =   struct('f',struct('N',Nb, ...
                                  'BreakCurvature',Cb, ...
                                  'PolyOrder',2,...
                                  'AppType','spli') ...
                       );

% Collect the Function Approximation Structure
FunAppStruct=   struct('V',VFunApp);

%--------------------------------------------------------------------------
% Policy Approximation
%--------------------------------------------------------------------------
VPolApp     =   struct('f',struct('N',40,...
                                  'BreakCurvature',0.1, ...
                                  'PolyOrder',2,...
                                  'AppType','spli') ...
                       );
                   
% Collect the Policy Approximation Structure
PolAppStruct=   struct('V',VPolApp);

%--------------------------------------------------------------------------
% Distribution Approximation
%--------------------------------------------------------------------------
f_N         =   50;
f_Curve     =   log(1e2)/f_N;
DistAppStruct ...
            =   struct('f',struct('N',f_N,'BreakCurvature',f_Curve) ...
                       );
%--------------------------------------------------------------------------
% General Computation
%--------------------------------------------------------------------------
DampenCoef  =   1-0.0;
InfoPrint   =   5;
ItTol       =   1e-6;
%% Collect the Parameters
PP          =   struct(... % Structural Parameters
                       ...%'BETA',BETA,...
                       'NU_C',NU_C,'NU_L',NU_L,'N_SS',N_SS,...
                       'XI',XI,...
                       'KAPPA',KAPPA,'b_lb',b_lb,...
                       'TAU_SS',TAU_SS,'T_SS',T_SS,...
                       'B_Total_SS',B_Total_SS,'B_Y_SS',B_Y_SS,...
                       'UI_Slack',UI_Slack,'MinCon',MinCon,...
                       'i_SS',i_SS,'Pir_SS',Pir_SS,...
                       'ALPHA',ALPHA,'EPSILON',EPSILON,'THETA',THETA,...
                       'Taylor_Pi',Taylor_Pi,'Taylor_ir',Taylor_ir,...
                       'RHO_Z',RHO_Z,'RHO_M',RHO_M,...
                       'SIG_Z',SIG_Z,'SIG_M',SIG_M,...
                       ... % Derived Parameters
                       ...'EffBETA',EffBETA,...
                       ... % Computation Parameters
                       'ExoState',ExoState,...
                       'QW',QW,...
                       'FunAppStruct',FunAppStruct,...
                       'PolAppStruct',PolAppStruct,...
                       'DistAppStruct',DistAppStruct,...
                       'DampenCoef',DampenCoef,...
                       'InfoPrint',InfoPrint,...
                       'ItTol',ItTol);